﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace grounding.nao.sensors
{
    /// <summary>
    /// Interface representing one 'frame' of sensor data.
    /// </summary>
    public interface ISensorFrame : ICollection<double>, IFormattable
    {
        #region Properties

        /// <summary>
        /// Sensor that this sensor frame came from.
        /// </summary>
        ISensor Sender { get; }

        /// <summary>
        /// Time that the sensorframe was captured.
        /// </summary>
        DateTime Timestamp { get; }

        #endregion

        #region Operators

        /// <summary>
        /// Gets the i dimension value from the sensor frame
        /// </summary>
        /// <param name="i">The dimension to access</param>
        /// <returns>The value of the i dimension</returns>
        double this[int i] { get; }

        #endregion

        #region Methods

        /// <summary>
        /// Returns an array representation of the data.  The ordering of this 
        /// array should be consistent between calls
        /// </summary>
        /// <returns></returns>
        double[] ToArray();

        #endregion
    }
}
